package main

import "fmt"

func fool(a string, b int) int {
	fmt.Println("a = ", a)
	fmt.Println("b = ", b)

	c := 100
	return c
}

// 匿名返回
func fool2(a string, b int) (int, int) {
	fmt.Println("a,b = ", a, b)

	return 666, 777
}

// 有返回名称
func fool3(a string, b int) (r1 int, r2 int) {
	fmt.Println("a,b = ", a, b)

	r1 = 666
	r2 = 777

	return
}

func main() {
	c := fool("abc", 555)
	fmt.Println(c)
	ret1, ret2 := fool2("asc", 123)
	fmt.Println("ret1,ret2 = ", ret1, ret2)

	ret3, ret4 := fool3("asc", 123)
	fmt.Println("ret3,ret4 = ", ret3, ret4)
}
